<!DOCTYPE html>

<html lang='en'>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="./lib/react.development16.4.0.js"></script>
    <script src="./lib/react-dom.development16.4.0.js"></script>
    <script src="./lib/babel.min.js"></script>
</head>

<body>
    <div id="app">
    </div>
    <script type="text/babel">
        var arr = ['Tom','Juery','peter','jick'];

        function btn_click() {
            //arr.push('啊啊啊啊！！！');
            alert('点击了按钮');
        }
        const el = <div>
                    <h1>元素渲染！！！</h1>
                    <ul>
                    {
                      arr.map((item,index)=>{
                          return <li key={index}>{item}</li>
                      })
                    }
                    </ul>
                    <button onClick={btn_click}>按钮</button>
                    </div>
                   
        
        ReactDOM.render(
            el,document.getElementById('app')
        );
    </script>
</body>

</html>